home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / email / mime / image.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  903b  |  24 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. __all__ = [
  5.     'MIMEImage']
  6. import imghdr
  7. from email import encoders
  8. from email.mime.nonmultipart import MIMENonMultipart
  9.  
  10. class MIMEImage(MIMENonMultipart):
  11.     
  12.     def __init__(self, _imagedata, _subtype = None, _encoder = encoders.encode_base64, **_params):
  13.         if _subtype is None:
  14.             _subtype = imghdr.what(None, _imagedata)
  15.         
  16.         if _subtype is None:
  17.             raise TypeError('Could not guess image MIME subtype')
  18.         
  19.         MIMENonMultipart.__init__(self, 'image', _subtype, **_params)
  20.         self.set_payload(_imagedata)
  21.         _encoder(self)
  22.  
  23.  
  24.